function _is_function(e){return"function"==typeof e}!function(){"use strict";var e=!1;window.JQClass=function(){},JQClass.classes={},JQClass.extend=function t(i){function s(){!e&&this._init&&this._init.apply(this,arguments)}var n=this.prototype;e=!0;var o=new this;e=!1;for(var a in i)if("function"==typeof i[a]&&"function"==typeof n[a])o[a]=function(e,t){return function(){var i=this._super;this._super=function(t){return n[e].apply(this,t||[])};var s=t.apply(this,arguments);return this._super=i,s}}(a,i[a]);else if("object"==typeof i[a]&&"object"==typeof n[a]&&"defaultOptions"===a){var r,l=n[a],_=i[a],p={};for(r in l)p[r]=l[r];for(r in _)p[r]=_[r];o[a]=p}else o[a]=i[a];return s.prototype=o,s.prototype.constructor=s,s.extend=t,s}}(),function($){"use strict";function camelCase(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}JQClass.classes.JQPlugin=JQClass.extend({name:"plugin",defaultOptions:{},regionalOptions:{},deepMerge:!0,_getMarker:function(){return"is-"+this.name},_init:function(){$.extend(this.defaultOptions,this.regionalOptions&&this.regionalOptions[""]||{});var e=camelCase(this.name);$[e]=this,$.fn[e]=function(t){var i=Array.prototype.slice.call(arguments,1),s=this,n=this;return this.each(function(){if("string"==typeof t){if("_"===t[0]||!$[e][t])throw"Unknown method: "+t;var o=$[e][t].apply($[e],[this].concat(i));if(o!==s&&void 0!==o)return n=o,!1}else $[e]._attach(this,t)}),n}},setDefaults:function(e){$.extend(this.defaultOptions,e||{})},_attach:function(e,t){if(e=$(e),!e.hasClass(this._getMarker())){e.addClass(this._getMarker()),t=$.extend(this.deepMerge,{},this.defaultOptions,this._getMetadata(e),t||{});var i=$.extend({name:this.name,elem:e,options:t},this._instSettings(e,t));e.data(this.name,i),this._postAttach(e,i),this.option(e,t)}},_instSettings:function(){return{}},_postAttach:function(){},_getMetadata:function(elem){try{var data=elem.data(this.name.toLowerCase())||"";data=data.replace(/(\\?)'/g,function(e,t){return t?"'":'"'}).replace(/([a-zA-Z0-9]+):/g,function(e,t,i){var s=data.substring(0,i).match(/"/g);return s&&s.length%2!==0?t+":":'"'+t+'":'}).replace(/\\:/g,":"),data=JSON.parse("{"+data+"}");for(var key in data)if(data.hasOwnProperty(key)){var value=data[key];"string"==typeof value&&value.match(/^new Date\(([-0-9,\s]*)\)$/)&&(data[key]=eval(value))}return data}catch(e){return{}}},_getInst:function(e){return $(e).data(this.name)||{}},option:function(e,t,i){e=$(e);var s=e.data(this.name),n=t||{};return!t||"string"==typeof t&&"undefined"==typeof i?(n=(s||{}).options,n&&t?n[t]:n):(e.hasClass(this._getMarker())&&("string"==typeof t&&(n={},n[t]=i),this._optionsChanged(e,s,n),$.extend(s.options,n)),void 0)},_optionsChanged:function(){},destroy:function(e){e=$(e),e.hasClass(this._getMarker())&&(this._preDestroy(e,this._getInst(e)),e.removeData(this.name).removeClass(this._getMarker()))},_preDestroy:function(){}}),$.JQPlugin={createPlugin:function(e,t){"object"==typeof e&&(t=e,e="JQPlugin"),e=camelCase(e);var i=camelCase(t.name);JQClass.classes[i]=JQClass.classes[e].extend(t),new JQClass.classes[i]}}}(jQuery),function(e){"use strict";var t="countdown",i=0,s=1,n=2,o=3,a=4,r=5,l=6;e.JQPlugin.createPlugin({name:t,defaultOptions:{until:null,since:null,timezone:null,serverSync:null,format:"dHMS",layout:"",compact:!1,padZeroes:!1,significant:0,description:"",expiryUrl:"",expiryText:"",alwaysExpire:!1,onExpiry:null,onTick:null,tickInterval:1},regionalOptions:{"":{labels:["Years","Months","Weeks","Days","Hours","Minutes","Seconds"],labels1:["Year","Month","Week","Day","Hour","Minute","Second"],compactLabels:["y","m","w","d"],whichLabels:null,digits:["0","1","2","3","4","5","6","7","8","9"],timeSeparator:":",isRTL:!1}},_rtlClass:t+"-rtl",_sectionClass:t+"-section",_amountClass:t+"-amount",_periodClass:t+"-period",_rowClass:t+"-row",_holdingClass:t+"-holding",_showClass:t+"-show",_descrClass:t+"-descr",_timerElems:[],_init:function(){function t(e){var r=1e12>e?n?window.performance.now()+window.performance.timing.navigationStart:s():e||s();r-a>=1e3&&(i._updateElems(),a=r),o(t)}var i=this;this._super(),this._serverSyncs=[];var s="function"==typeof Date.now?Date.now:function(){return(new Date).getTime()},n=window.performance&&"function"==typeof window.performance.now,o=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||null,a=0;!o||e.noRequestAnimationFrame?(e.noRequestAnimationFrame=null,e.countdown._timer=setInterval(function(){i._updateElems()},1e3)):(a=window.animationStartTime||window.webkitAnimationStartTime||window.mozAnimationStartTime||window.oAnimationStartTime||window.msAnimationStartTime||s(),o(t))},UTCDate:function(e,t,i,s,n,o,a,r){"object"==typeof t&&t instanceof Date&&(r=t.getMilliseconds(),a=t.getSeconds(),o=t.getMinutes(),n=t.getHours(),s=t.getDate(),i=t.getMonth(),t=t.getFullYear());var l=new Date;return l.setUTCFullYear(t),l.setUTCDate(1),l.setUTCMonth(i||0),l.setUTCDate(s||1),l.setUTCHours(n||0),l.setUTCMinutes((o||0)-(Math.abs(e)<30?60*e:e)),l.setUTCSeconds(a||0),l.setUTCMilliseconds(r||0),l},periodsToSeconds:function(e){return 31557600*e[0]+2629800*e[1]+604800*e[2]+86400*e[3]+3600*e[4]+60*e[5]+e[6]},resync:function(){var t=this;e("."+this._getMarker()).each(function(){var i=e.data(this,t.name);if(i.options.serverSync){for(var s=null,n=0;n-1},_removeElem:function(t){this._timerElems=e.map(this._timerElems,function(e){return e===t?null:e})},_updateElems:function(){for(var e=this._timerElems.length-1;e>=0;e--)this._updateCountdown(this._timerElems[e])},_optionsChanged:function(t,i,s){s.layout&&(s.layout=s.layout.replace(/</g,"<").replace(/>/g,">")),this._resetExtraLabels(i.options,s);var n=i.options.timezone!==s.timezone;e.extend(i.options,s),this._adjustSettings(t,i,!this._eqNull(s.until)||!this._eqNull(s.since)||n);var o=new Date;(i._since&&i._sinceo)&&this._addElem(t[0]),this._updateCountdown(t,i)},_updateCountdown:function(t,i){if(t=t.jquery?t:e(t),i=i||this._getInst(t),i&&i.options){if(t.html(this._generateHTML(i)).toggleClass(this._rtlClass,i.options.isRTL),"pause"!==i._hold&&_is_function(i.options.onTick)){var s="lap"!==i._hold?i._periods:this._calculatePeriods(i,i._show,i.options.significant,new Date);(1===i.options.tickInterval||this.periodsToSeconds(s)%i.options.tickInterval===0)&&i.options.onTick.apply(t[0],[s])}var n="pause"!==i._hold&&(i._since?i._now.getTime()=i._until.getTime());if(n&&!i._expiring){if(i._expiring=!0,this._hasElem(t[0])||i.options.alwaysExpire){if(this._removeElem(t[0]),_is_function(i.options.onExpiry)&&i.options.onExpiry.apply(t[0],[]),i.options.expiryText){var o=i.options.layout;i.options.layout=i.options.expiryText,this._updateCountdown(t[0],i),i.options.layout=o}i.options.expiryUrl&&(window.location=i.options.expiryUrl)}i._expiring=!1}else"pause"===i._hold&&this._removeElem(t[0])}},_resetExtraLabels:function(e,t){var i=null;for(i in t)i.match(/[Ll]abels[02-9]|compactLabels1/)&&(e[i]=t[i]);for(i in e)i.match(/[Ll]abels[02-9]|compactLabels1/)&&"undefined"==typeof t[i]&&(e[i]=null)},_eqNull:function(e){return"undefined"==typeof e||null===e},_adjustSettings:function(e,t,i){for(var s=null,n=0;n=d;d++)p=p||"?"===t._show[d]&&t._periods[d]>0,h[d]="?"!==t._show[d]||p?t._show[d]:null,u+=h[d]?1:0,c-=t._periods[d]>0?1:0;var m=[!1,!1,!1,!1,!1,!1,!1];for(d=l;d>=i;d--)t._show[d]&&(t._periods[d]?m[d]=!0:(m[d]=c>0,c--));var g=t.options.compact?t.options.compactLabels:t.options.labels,f=t.options.whichLabels||this._normalLabels,w=function(e){var i=t.options["compactLabels"+f(t._periods[e])];return h[e]?_._translateDigits(t,t._periods[e])+(i?i[e]:g[e])+" ":""},y=t.options.padZeroes?2:1,v=function(e){var i=t.options["labels"+f(t._periods[e])];return!t.options.significant&&h[e]||t.options.significant&&m[e]?''+_._minDigits(t,t._periods[e],y)+''+(i?i[e]:g[e])+"":""};return t.options.layout?this._buildLayout(t,h,t.options.layout,t.options.compact,t.options.significant,m):(t.options.compact?''+w(i)+w(s)+w(n)+w(o)+(h[a]?this._minDigits(t,t._periods[a],2):"")+(h[r]?(h[a]?t.options.timeSeparator:"")+this._minDigits(t,t._periods[r],2):"")+(h[l]?(h[a]||h[r]?t.options.timeSeparator:"")+this._minDigits(t,t._periods[l],2):""):''+v(i)+v(s)+v(n)+v(o)+v(a)+v(r)+v(l))+""+(t.options.description?''+t.options.description+"":"")},_buildLayout:function(t,_,p,u,c,h){for(var d=t.options[u?"compactLabels":"labels"],m=t.options.whichLabels||this._normalLabels,g=function(e){return(t.options[(u?"compactLabels":"labels")+m(t._periods[e])]||d)[e]},f=function(e,i){return t.options.digits[Math.floor(e/i)%10]},w={desc:t.options.description,sep:t.options.timeSeparator,yl:g(i),yn:this._minDigits(t,t._periods[i],1),ynn:this._minDigits(t,t._periods[i],2),ynnn:this._minDigits(t,t._periods[i],3),y1:f(t._periods[i],1),y10:f(t._periods[i],10),y100:f(t._periods[i],100),y1000:f(t._periods[i],1e3),ol:g(s),on:this._minDigits(t,t._periods[s],1),onn:this._minDigits(t,t._periods[s],2),onnn:this._minDigits(t,t._periods[s],3),o1:f(t._periods[s],1),o10:f(t._periods[s],10),o100:f(t._periods[s],100),o1000:f(t._periods[s],1e3),wl:g(n),wn:this._minDigits(t,t._periods[n],1),wnn:this._minDigits(t,t._periods[n],2),wnnn:this._minDigits(t,t._periods[n],3),w1:f(t._periods[n],1),w10:f(t._periods[n],10),w100:f(t._periods[n],100),w1000:f(t._periods[n],1e3),dl:g(o),dn:this._minDigits(t,t._periods[o],1),dnn:this._minDigits(t,t._periods[o],2),dnnn:this._minDigits(t,t._periods[o],3),d1:f(t._periods[o],1),d10:f(t._periods[o],10),d100:f(t._periods[o],100),d1000:f(t._periods[o],1e3),hl:g(a),hn:this._minDigits(t,t._periods[a],1),hnn:this._minDigits(t,t._periods[a],2),hnnn:this._minDigits(t,t._periods[a],3),h1:f(t._periods[a],1),h10:f(t._periods[a],10),h100:f(t._periods[a],100),h1000:f(t._periods[a],1e3),ml:g(r),mn:this._minDigits(t,t._periods[r],1),mnn:this._minDigits(t,t._periods[r],2),mnnn:this._minDigits(t,t._periods[r],3),m1:f(t._periods[r],1),m10:f(t._periods[r],10),m100:f(t._periods[r],100),m1000:f(t._periods[r],1e3),sl:g(l),sn:this._minDigits(t,t._periods[l],1),snn:this._minDigits(t,t._periods[l],2),snnn:this._minDigits(t,t._periods[l],3),s1:f(t._periods[l],1),s10:f(t._periods[l],10),s100:f(t._periods[l],100),s1000:f(t._periods[l],1e3)},y=p,v=i;l>=v;v++){var D="yowdhms".charAt(v),M=new RegExp("\\{"+D+"<\\}([\\s\\S]*)\\{"+D+">\\}","g");y=y.replace(M,!c&&_[v]||c&&h[v]?"$1":"")}return e.each(w,function(e,t){var i=new RegExp("\\{"+e+"\\}","g");y=y.replace(i,t)}),y},_minDigits:function(e,t,i){return t=""+t,t.length>=i?this._translateDigits(e,t):(t="0000000000"+t,this._translateDigits(e,t.substr(t.length-i)))},_translateDigits:function(e,t){return(""+t).replace(/[0-9]/g,function(t){return e.options.digits[t]})},_determineShow:function(e){var t=e.options.format,_=[];return _[i]=t.match("y")?"?":t.match("Y")?"!":null,_[s]=t.match("o")?"?":t.match("O")?"!":null,_[n]=t.match("w")?"?":t.match("W")?"!":null,_[o]=t.match("d")?"?":t.match("D")?"!":null,_[a]=t.match("h")?"?":t.match("H")?"!":null,_[r]=t.match("m")?"?":t.match("M")?"!":null,_[l]=t.match("s")?"?":t.match("S")?"!":null,_},_calculatePeriods:function(e,t,_,p){e._now=p,e._now.setMilliseconds(0);var u=new Date(e._now.getTime());e._since?p.getTime()e._until.getTime()&&(e._now=p=u));var c=[0,0,0,0,0,0,0];if(t[i]||t[s]){var h=this._getDaysInMonth(p.getFullYear(),p.getMonth()),d=this._getDaysInMonth(u.getFullYear(),u.getMonth()),m=u.getDate()===p.getDate()||u.getDate()>=Math.min(h,d)&&p.getDate()>=Math.min(h,d),g=function(e){return 60*(60*e.getHours()+e.getMinutes())+e.getSeconds()},f=Math.max(0,12*(u.getFullYear()-p.getFullYear())+u.getMonth()-p.getMonth()+(u.getDate()y&&p.setDate(y),p.setFullYear(p.getFullYear()+c[i]),p.setMonth(p.getMonth()+c[s]),w&&p.setDate(y)}var v=Math.floor((u.getTime()-p.getTime())/1e3),D=null,M=function(e,i){c[e]=t[e]?Math.floor(v/i):0,v-=c[e]*i};if(M(n,604800),M(o,86400),M(a,3600),M(r,60),M(l,1),v>0&&!e._since){var C=[1,12,4.3482,7,24,60,60],T=l,S=1;for(D=l;D>=i;D--)t[D]&&(c[T]>=S&&(c[T]=0,v=1),v>0&&(c[D]++,v=0,T=D,S=1)),S*=C[D]}if(_)for(D=i;l>=D;D++)_&&c[D]?_--:_||(c[D]=0);return c}})}(jQuery);